import s from './index.module.less'
import {Outlet, useLocation, useNavigate} from "react-router-dom";
import {Radio, RadioGroup, Toast, Typography} from "@douyinfe/semi-ui";
import Container from "@/components/container";
import {useEffect} from "react";


const Setting = () => {

    const navigate = useNavigate();

    const location = useLocation();

    useEffect(() => {
        if (location.pathname === '/setting') {
            navigate("/setting/ai");
        }
    }, [location.pathname]);

    return <Container className={s.container}>
        <div className={s.toolbar}>
            <RadioGroup
                type={"button"}
                value={'ai'}
                onChange={() => {
                    Toast.warning("功能还没有开发好，去别处看看吧~")
                }}
            >
                <Radio value={"ai"}>Ai</Radio>
                <Radio value={"preferences"}> 偏好</Radio>
                <Radio value={"about"}>关于</Radio>
            </RadioGroup>

            <Typography.Text strong>配置你的AI助手</Typography.Text>
        </div>
        <Outlet/>
    </Container>;
}
export default Setting;